package com.sp.pay.action.sp;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sp.pay.dto.QueryDto;
import com.sp.pay.dto.sms.SmsDto;
import com.sp.pay.repository.sms.SmsRepository;

@Controller
@RequestMapping(value = "sp/")
public class SpAction {

    private  String INDEX = "sp/index";

    @Autowired
    SmsRepository smsRepository;

    @RequestMapping(value ="index.do" )
    public String index(Model model){
        QueryDto<SmsDto> queryDto = new QueryDto<SmsDto>(new SmsDto(),0,100);
        model.addAttribute("result",smsRepository.query(queryDto));
        return INDEX;
    }
}
